<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/11/19
 * Time: 17:49
 */

class TxMap{
    static $distince = null;
    public static function create(){
        if(null === self::$distince){
            self::$distince = new self;
        }
        return self::$distince;
    }

    public function get_addr_by_latlng($latlng){
        $url = " http://apis.map.qq.com/ws/geocoder/v1/?location={$latlng}&key=".DXW_TXMAP_KEY;
        $re = \Curl::getInstance()->get($url)->getBody();
        $json_data = json_decode($re,true);
        return $json_data;
    }
}